package com.rb.domain;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created by Brooks on 2014/5/7.
 */
@Entity
public class 系统菜单权限 {
    private String id;
    private String 角色Id;
    private String 菜单Json;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "角色id")
    public String get角色Id() {
        return 角色Id;
    }

    public void set角色Id(String 角色Id) {
        this.角色Id = 角色Id;
    }

    @Basic
    @Column(name = "菜单json")
    public String get菜单Json() {
        return 菜单Json;
    }

    public void set菜单Json(String 菜单Json) {
        this.菜单Json = 菜单Json;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        系统菜单权限 系统菜单权限 = (系统菜单权限) o;

        if (id != null ? !id.equals(系统菜单权限.id) : 系统菜单权限.id != null) return false;
        if (菜单Json != null ? !菜单Json.equals(系统菜单权限.菜单Json) : 系统菜单权限.菜单Json != null) return false;
        if (角色Id != null ? !角色Id.equals(系统菜单权限.角色Id) : 系统菜单权限.角色Id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (角色Id != null ? 角色Id.hashCode() : 0);
        result = 31 * result + (菜单Json != null ? 菜单Json.hashCode() : 0);
        return result;
    }
}
